#include "StdAfx.h"
#include "MyGroupBox.h"


MyGroupBox::MyGroupBox(void)
{
}


MyGroupBox::~MyGroupBox(void)
{
}


HWND MyGroupBox::createGroupBox(LPCWSTR text,int pos,int x, int y, int cx,int cy, HWND hParent, int id ,
	int nHeight,int fnWeight , BOOL fdwItalic , BOOL fdwUnderline, LPTSTR font, HINSTANCE hInst)
{
	InitCommonControls();

	hInstance = hInst;
	hGroupBox = CreateWindow(TEXT("BUTTON"),  text, WS_CHILD|WS_VISIBLE|BS_GROUPBOX|pos, x, y, cx, cy, hParent, (HMENU) id, hInst, NULL); 	

	HFONT hFont = CreateFont(nHeight,0,0,0,fnWeight,fdwItalic,fdwUnderline,0,VIETNAMESE_CHARSET,OUT_DEFAULT_PRECIS,
		CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY, VARIABLE_PITCH,font);

	SendMessage(hGroupBox,WM_SETFONT,(WPARAM)hFont, 0);

	return hGroupBox;
}

HWND MyGroupBox::getHandle()
{
	return hGroupBox;
}



void MyGroupBox::hide()
{
	ShowWindow(hGroupBox,SW_HIDE);
}


void MyGroupBox::show()
{
	ShowWindow(hGroupBox,SW_SHOW);
}


void MyGroupBox::move(int x, int y, int cx, int cy)
{
	MoveWindow(hGroupBox,x, y, cx, cy,TRUE);
}
